package com.yoomiito.app.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.File;

public class VersionInfo implements Parcelable {


    /**
     * id : 2
     * ctime : 2018-02-19 14:49:32
     * mtime : 2018-12-25 14:49:34
     * is_deleted : 0
     * platform : 1
     * content : 新版本更新1.1.6
     * app_version : 1.1.6
     * is_force : 1
     * app_min_version : 1.1.3
     * download_url : https://mimitao-h5.aijiamai.com/H5/mlsh-download/index.html
     * app_content : 新版本更新1.1.6
     * download_type : 1
     * app_code : 2
     * app_size : 11.33
     */

    private long id;
    private String ctime;
    private String mtime;
    private int is_deleted;
    private int platform;
    private String content;
    private String app_version;
    private int is_force;
    private String app_min_version;
    private String download_url;
    private String app_content;
    private int download_type;
    private int app_code;//Android用于版本更新 版本号
    private String app_size;
    private File mFile;
    private int progress;
    private String force_app_code;//Android用
    private String force_app_version;//ios用

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getCtime() {
        return ctime;
    }

    public void setCtime(String ctime) {
        this.ctime = ctime;
    }

    public String getMtime() {
        return mtime;
    }

    public void setMtime(String mtime) {
        this.mtime = mtime;
    }

    public int getIs_deleted() {
        return is_deleted;
    }

    public void setIs_deleted(int is_deleted) {
        this.is_deleted = is_deleted;
    }

    public int getPlatform() {
        return platform;
    }

    public void setPlatform(int platform) {
        this.platform = platform;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getApp_version() {
        return app_version;
    }

    public void setApp_version(String app_version) {
        this.app_version = app_version;
    }

    public int getIs_force() {
        return is_force;
    }

    public void setIs_force(int is_force) {
        this.is_force = is_force;
    }

    public String getApp_min_version() {
        return app_min_version;
    }

    public void setApp_min_version(String app_min_version) {
        this.app_min_version = app_min_version;
    }

    public String getDownload_url() {
        return download_url;
    }

    public void setDownload_url(String download_url) {
        this.download_url = download_url;
    }

    public String getApp_content() {
        return app_content;
    }

    public void setApp_content(String app_content) {
        this.app_content = app_content;
    }

    public int getDownload_type() {
        return download_type;
    }

    public void setDownload_type(int download_type) {
        this.download_type = download_type;
    }

    public int getApp_code() {
        return app_code;
    }

    public void setApp_code(int app_code) {
        this.app_code = app_code;
    }

    public String getApp_size() {
        return app_size;
    }

    public void setApp_size(String app_size) {
        this.app_size = app_size;
    }

    public File getFile() {
        return mFile;
    }

    public void setFile(File file) {
        mFile = file;
    }

    public int getProgress() {
        return progress;
    }

    public void setProgress(int progress) {
        this.progress = progress;
    }

    public String getForce_app_code() {
        return force_app_code;
    }

    public void setForce_app_code(String force_app_code) {
        this.force_app_code = force_app_code;
    }

    public String getForce_app_version() {
        return force_app_version;
    }

    public void setForce_app_version(String force_app_version) {
        this.force_app_version = force_app_version;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.id);
        dest.writeString(this.ctime);
        dest.writeString(this.mtime);
        dest.writeInt(this.is_deleted);
        dest.writeInt(this.platform);
        dest.writeString(this.content);
        dest.writeString(this.app_version);
        dest.writeInt(this.is_force);
        dest.writeString(this.app_min_version);
        dest.writeString(this.download_url);
        dest.writeString(this.app_content);
        dest.writeInt(this.download_type);
        dest.writeInt(this.app_code);
        dest.writeString(this.app_size);
        dest.writeSerializable(this.mFile);
        dest.writeInt(this.progress);
        dest.writeString(this.force_app_code);
        dest.writeString(this.force_app_version);
    }

    public VersionInfo() {
    }

    protected VersionInfo(Parcel in) {
        this.id = in.readLong();
        this.ctime = in.readString();
        this.mtime = in.readString();
        this.is_deleted = in.readInt();
        this.platform = in.readInt();
        this.content = in.readString();
        this.app_version = in.readString();
        this.is_force = in.readInt();
        this.app_min_version = in.readString();
        this.download_url = in.readString();
        this.app_content = in.readString();
        this.download_type = in.readInt();
        this.app_code = in.readInt();
        this.app_size = in.readString();
        this.mFile = (File) in.readSerializable();
        this.progress = in.readInt();
        this.force_app_code = in.readString();
        this.force_app_version = in.readString();
    }

    public static final Creator<VersionInfo> CREATOR = new Creator<VersionInfo>() {
        @Override
        public VersionInfo createFromParcel(Parcel source) {
            return new VersionInfo(source);
        }

        @Override
        public VersionInfo[] newArray(int size) {
            return new VersionInfo[size];
        }
    };
}
